import { S } from '../../../s';
import { IPSDEFVRCondition } from './ipsdefvrcondition';
import { PSModelObjectImpl } from '../../../psmodel-object-impl';

export class PSDEFVRConditionImpl
  extends PSModelObjectImpl
  implements IPSDEFVRCondition
{
  get condTag(): string {
    return this.M.condTag;
  }

  get condTag2(): string {
    return this.M.condTag2;
  }

  get condType():
    | 'GROUP'
    | 'NULLRULE'
    | 'VALUERANGE'
    | 'VALUERANGE2'
    | 'REGEX'
    | 'STRINGLENGTH'
    | 'SIMPLE'
    | 'VALUERANGE3'
    | 'QUERYCOUNT'
    | 'VALUERECURSION'
    | 'SYSVALUERULE' {
    return this.M.condType;
  }

  get ruleInfo(): string {
    return this.M.ruleInfo;
  }

  get keyCond(): boolean {
    return this.M.keyCond != null ? this.M.keyCond : false;
  }

  get notMode(): boolean {
    return this.M.notMode != null ? this.M.notMode : false;
  }

  get tryMode(): boolean {
    return this.M.tryMode;
  }
  get cls(): string {
    return 'PSDEFVRConditionImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._1c5) return true;
    return super.instanceof(cls);
  }
}
